<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ page import = "java.util.*" %>
<%@ page import="de.openlaboratory.elib.model.library.*" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<h1>Files</h1>

<div id="file-import">

	<div id="file-import-list">
	    <c:forEach items="${files}" var="file">
	     	<div class="file-import-list-item-entry">
	     		<img src="img/icons/page_white_<c:out value="${file.extension}" />.png" />
	     		<a href="#" class="file-import-list-item" onclick="getFileDetails('${fn:replace(file.fullPath, '\\', '?')}');return false;"><c:out value="${file.name}" /></a><br />
	     	</div>
	    </c:forEach>
    </div>

	<div id="file-import-form">
	    <img id="file-import-thumbnail" src="img/blank.gif" />
	    
	    <form action="file" method="post" id="import-form">
	        <label for="title">Title</label>
	        <input id="title" name="title" size="70" value="" />
	        <img src="img/icons/spellcheck.png" id="img-title-spellcheck" />
	        <br />
	        <label for="subtitle">Subtitle</label>
	        <input id="subtitle" name="subtitle" size="70" value="" />
	        <img src="img/icons/spellcheck.png" id="img-subtitle-spellcheck" />
	        <br />
	        <label for="authors">Authors</label>
	        <textarea id="authors" name="authors" rows="3" cols="50"></textarea>
	        <img src="img/icons/user_edit.png" id="img-authors-spellcheck" />
	        <br />

            <table>
                <tr>
                    <td>
				        <label for="pages">Pages</label>
				        <input id="pages" name="pages" size="5" value="" />
                    </td>
                    <td>
				        <label for="year">Year</label>
				        <input id="year" name="year" size="4" value="" />
                    </td>
                    <td>
				        <label for="edition">Edition</label>
				        <input id="edition" name="edition" size="2" value="" />
                    </td>
                    <td>
				        <label for="publisher">Publisher</label>
				        <input id="publisher" name="publisher" size="8" value="" />
                    </td>
                    <td>
				        <label for="library">Library</label>
				        <input id="library" name="library" size="14" value="" />
                    </td>
                    <td>
				        <label for="isbn">ISBN</label>
				        <input id="isbn" name="isbn" size="16" value="" />
                    </td>
                </tr>
                <tr>
                    <td>
				        <label for="w1">-</label>
				        <input id="w1" name="w1" size="5" value="" />
                    </td>
                    <td>
				        <label for="w2">-</label>
				        <input id="w2" name="w2" size="5" value="" />
                    </td>
                    <td>
				        <label for="w3">-</label>
				        <input id="w3" name="w3" size="2" value="" />
                    </td>
                    <td>
				        <label for="w4">-</label>
				        <input id="w4" name="w4" size="8" value="" />
                    </td>
                    <td>
				        <label for="type">Type</label>
				        <input id="type" name="type" size="14" value="" />
                    </td>
                    <td>
				        <label for="eisbn">eISBN</label>
				        <input id="eisbn" name="eisbn" size="16" value="" />
                    </td>
                </tr>
                <tr>
                    <td colspan="3">
				        <input type="submit">
                    </td>
                    <td>
				        
                    </td>
                    <td>
				        
                    </td>
                    <td align="right">
				        <input name="cover" type="checkbox" checked/> Cover
                    </td>
                </tr>
            </table>

	        <br />
	        <input type="hidden" name="action" value="EDIT" />
	        <input type="hidden" name="id" value="" />
	        <input type="hidden" name="elib_action" value="EDIT" />
	        <input type="hidden" name="elib_ns" value="<%= Publication.class.toString() %>" />

	    </form>
	</div>

    <div id="file-import-display">
    	<embed id="pdf-display-object" src="http://www.wantec.de/fileadmin/user_upload/2927961_test.pdf" width="700" height="987">
    	<!-- object id="pdf-display-object" width="100%" height="100%" type="application/pdf" data="http://www.wantec.de/fileadmin/user_upload/2927961_test.pdf#"></object -->
    	<!-- canvas id="pdf-display-canvas" style="border:1px solid black;"/ -->
    </div>
</div>